Chinese Poker
By: David Blume

Requirements:
• MacTCP
• At least one other Mac connected to this Mac on a network.
    (2 to 4 players are supported.)

Overview: What is Chinese Poker?

This game is derived from a card game in China.  It is an addictive game that is easy to learn.  Each player tries to discard all the cards in his hand. When someone discards his last card, the others are penalized points for the cards left in their hands.  This computer version is an interactive network game between 2, 3 or 4 players.

Rules for standard Chinese Poker:

Before playing, the players agree to play to a certain score maximum.  (Usually 100.)  Once any player reaches the maximum, the game is over.  The player with the lowest  score is the winner.

Chinese poker is played with a standard deck of 52 playing cards.  Three 2's and one ace are removed, leaving a deck with 48 cards.  Suits and color do not matter.  Only the values of the cards matter.  Aces beat kings.  When played individually, the two is the high card. (It will beat an ace.)  When played in straights, the two is the low card.

• Cutting for the First Deal
Each player selects a single card from the deck.  Aces are high during the cut.  The owner of the high card gets the deal.  The dealer also gets to make the first play.  ("Plays" are described below.)  The play then rotates clockwise around the table.

• Dealing
2 Players:  The dealer deals out 3 hands of 16 cards each.  Then the dealer gets 
                  to choose any one of the three hands.  The other player then gets to
                  select one of the remaining two hands.
3 Players:  The dealer deals out 3 hands of 16 cards each.  Each player plays the 
                  hand he is delt.
4 Players:  The dealer deals out 4 hands of 12 cards each.  Each player plays the 
                  hand he is delt.

• Playing
First play:  The current player may discard a valid "hand" from his whole hand, or choose to pass.  To discard a hand, place the selected cards face up on the table to show to the other players.  They will have to beat this hand, or pass.  Valid hands are described below.
Subsequent plays:  Each subsequent player may discard a better hand of the same type as the one shown on the table (if he has such a hand), or pass.  For example, if the current play on the table is a pair of 8's, the only play that may be discarded to beat that hand is another pair of a higher value (9's and up).  (Four of a kind is a wild hand, an exception, and is described below.)
If everyone passes, then the player who discarded the most recent hand may discard a new hand of any type.  (As in the first play.)  Once a player discards his last card, he has won the round and each player has to tally his own score.  The winner of the round gets to deal the next round.  (This can be very frustrating if you're not the winner!)

Valid Hands to Discard:
Single Card:  A single card may be discarded as a hand. 3 is the lowest,and 2 is
             the highest.
Pairs: A single pair, or sequential pairs, may be discarded as a hand.  Any 
             number of pairs may be discarded in a hand, as long as they are 
             sequential.  (Eg., 445566 is a valid hand, while 445577 is not because 
             7 does not come immediately after 5.)
Three of a Kinds: As pairs, three of a kinds may be played individually, or in 
             groups of sequential values.  (E.g., 333444.)
Full House: A pair accompanied by a three of a kind.  Only the value of the three 
             of a kind needs to be beaten in the subsequent play.  (99944 beats 777KK
             because 9's are higher than 7's.)
Straight: Straights must be at least 5 cards long.  They may be as long as 13 
             cards.  The 2 is the low card in straights.  To beat a straight, you must 
             play a higher straight of exactly the same number of cards.  (E.g., 
             456789 beats 345678.)
Four of a Kind: Four of a kinds must be played with a fifth card.  The value of the
             fifth card is the value to be beat by another four of a kind.  (E.g., 84444 
             beats 6JJJJ because 8's are higher than  6's.)  Four of a kinds are 
            wild hands and may be played on any  other kind of hand!

• Scoring
Each time somebody has won a round, the other players have to count the number of their remaining cards, and add points to their current score according to the following chart:

All cards caught in the hand: 50 points.

All cards but one caught in the hand: 40 points.

All cards but two caught in the hand: 30 points.

Otherwise: Add 1 point for each card caught in the hand.

How to Play the Computer Version:

1. Have all the players launch "Chinese Poker."  Designate one player to be the 
    "host" and have all the other players connect to the host.  Use Connect from 
    the File menu.  (You may use either the host name or internet address in the 
    Connect dialog box.)  Once connected, the host will get to cut first.  Notice 
    that a gray rectangle is always around the current player.  When the gray 
    rectangle is around your statistics, it is your turn to play.
2. Each player gets a chance to cut for the deal.  When it is your turn to  cut, 
    select a card by clicking on it, then click on the "Cut" button.
3. If there are only two players select your hand by clicking on it, then clicking 
    on the "Play" button.
4. During regular play, select cards by clicking on them, and click on the "Play" 
    button to play those selections.  (You may only play your hand when it is your 
    turn.)  The "Play" button is only enabled when you have selected cards.  The 
    "Pass" button is only enabled when no cards are selected.
    You may exchange text messages by typing in a short message and selecting 
    the send button (or hitting the "return" key.)

Thanks:
• Derek and Pei Fluker
   Thanks for introducing me to this addictive game!
• Ted Pederson
   Thanks for beta testing and offering your ideas and algorithms.
• Julie Wong "Make a program for me!", and Shu-Chung for knowing that sanity 
   is a precious thing.
• Björk "There's More to Life than this", Kimagure Orange Road (Matsumoto's 
   stories, Takada's designs, and Wada's songs!), and Ai Amano's "Suckerfish!"

Revision Notes:
1.0    Original
1.0.1 User interface corrections.
         System 6.X compatability. (Some cards were invisible under System 6.)
         May use either host names or addresses in the "Connect…" dialog.

Future Enhancements:
• (Optional) Computer opponent.
• AppleEvents fully supported.

Questions? Comments?
Contact me at: blume@twg.com.  I'd like to hear your suggestions and how you got ahold of this game.

Notice:
This program is freeware, and may be freely copied and distributed.

This program is © 1993, David Blume.
Parts are © Apple Computer.